import React from 'react'
import { createPortal } from 'react-dom'

export default function PortalDialog(props) {
    return createPortal(
        (
            <div style={{
                width: '100%', height: '100%', position: 'fixed', left: 0,
                top: 0, background: 'rgba(0,0,0,0.7)', zIndex: "9999999"
            }}>
                数据正在加载中<br/>
                <button onClick={props.close}>close</button>
            </div>
        ), document.body
    )
}
